/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.internalFrames;

import controle.gui.ControleIFMovimentoCaixaDiario;
import gui.superclass.InternalFrame;
import gui.utils.MascarasJTextField;
import gui.utils.NumeroDocument;
import javax.swing.JFormattedTextField;

/**
 *
 * @author Maycon Fernando Silva Brito
 * @email mayconfsbrito@gmail.com
 */
public class InternalFrameMovimentoCaixa extends InternalFrame {

    private ControleIFMovimentoCaixaDiario controle = new ControleIFMovimentoCaixaDiario(this);
    
    /**
     * Creates new form InternalFrameMovimentoCaixa
     */
    public InternalFrameMovimentoCaixa() {
        initComponents();
        setVisible(true);
        controle.inicializa();
    }

    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the
     * Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        groupSituacao = new javax.swing.ButtonGroup();
        panelConsulta = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        textDataConsulta = new javax.swing.JFormattedTextField(new MascarasJTextField().inserirMascara("##/##/####"));
        ((JFormattedTextField)textDataConsulta).setFocusLostBehavior(JFormattedTextField.COMMIT);
        buttonConsulta = new javax.swing.JButton();
        panelInformação = new javax.swing.JPanel();
        scrollTabela = new javax.swing.JScrollPane();
        tabela = new javax.swing.JTable();
        panelOpcoesConta = new javax.swing.JPanel();
        buttonAreceber = new javax.swing.JButton();
        buttonApagar = new javax.swing.JButton();
        buttonDesfazer = new javax.swing.JButton();
        panelSituacao = new javax.swing.JPanel();
        radioAberto = new javax.swing.JRadioButton();
        radioFechado = new javax.swing.JRadioButton();
        textHoraFechamento = new javax.swing.JTextField();
        panelSaldo = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        labelRS = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        labelRS1 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        labelRS2 = new javax.swing.JLabel();
        textSaldoCreditoTotal = new javax.swing.JTextField();
        textSaldoDebitoTotal = new javax.swing.JTextField();
        textSaldoTotal = new javax.swing.JTextField();
        labelCodigo = new javax.swing.JLabel();
        textCodigo = new javax.swing.JTextField();
        panelOpcoes = new javax.swing.JPanel();
        buttonSair = new javax.swing.JButton();
        buttonImprimir = new javax.swing.JButton();
        buttonFechar = new javax.swing.JButton();
        buttonLimpar = new javax.swing.JButton();
        panelMensagem = new javax.swing.JPanel();
        textMensagem = new javax.swing.JTextField();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle("Movimento de Caixa Diário");

        panelConsulta.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Consulta", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jLabel1.setText("Data do Caixa Diário:");

        ((JFormattedTextField)textDataConsulta).setHorizontalAlignment(textDataConsulta.LEFT);
        textDataConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textDataConsultaActionPerformed(evt);
            }
        });

        buttonConsulta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Procurar.png"))); // NOI18N
        buttonConsulta.setText("Consultar");
        buttonConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonConsultaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelConsultaLayout = new javax.swing.GroupLayout(panelConsulta);
        panelConsulta.setLayout(panelConsultaLayout);
        panelConsultaLayout.setHorizontalGroup(
            panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConsultaLayout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textDataConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonConsulta)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        panelConsultaLayout.setVerticalGroup(
            panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel1)
                .addComponent(textDataConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(buttonConsulta))
        );

        panelInformação.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informações do Caixa Diário", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        tabela.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Cod. a pagar", "Cod. a receber", "Quitado às", "Descrição", "Crédito", "Débito"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabela.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        scrollTabela.setViewportView(tabela);

        panelOpcoesConta.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Opções da Conta", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        buttonAreceber.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Adicionar (2).png"))); // NOI18N
        buttonAreceber.setText("A receber");
        buttonAreceber.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAreceberActionPerformed(evt);
            }
        });

        buttonApagar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Menos.png"))); // NOI18N
        buttonApagar.setText("A pagar");
        buttonApagar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonApagarActionPerformed(evt);
            }
        });

        buttonDesfazer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Desconcluir.png"))); // NOI18N
        buttonDesfazer.setText("Desfazer pagamento");
        buttonDesfazer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonDesfazerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelOpcoesContaLayout = new javax.swing.GroupLayout(panelOpcoesConta);
        panelOpcoesConta.setLayout(panelOpcoesContaLayout);
        panelOpcoesContaLayout.setHorizontalGroup(
            panelOpcoesContaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpcoesContaLayout.createSequentialGroup()
                .addComponent(buttonAreceber)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonApagar))
            .addGroup(panelOpcoesContaLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(buttonDesfazer))
        );
        panelOpcoesContaLayout.setVerticalGroup(
            panelOpcoesContaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpcoesContaLayout.createSequentialGroup()
                .addGroup(panelOpcoesContaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonAreceber)
                    .addComponent(buttonApagar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(buttonDesfazer))
        );

        panelSituacao.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Situação", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        groupSituacao.add(radioAberto);
        radioAberto.setSelected(true);
        radioAberto.setText("Em Aberto");

        groupSituacao.add(radioFechado);
        radioFechado.setText("Fechado às");

        textHoraFechamento.setEnabled(false);

        javax.swing.GroupLayout panelSituacaoLayout = new javax.swing.GroupLayout(panelSituacao);
        panelSituacao.setLayout(panelSituacaoLayout);
        panelSituacaoLayout.setHorizontalGroup(
            panelSituacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(radioAberto)
            .addGroup(panelSituacaoLayout.createSequentialGroup()
                .addComponent(radioFechado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textHoraFechamento, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        panelSituacaoLayout.setVerticalGroup(
            panelSituacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSituacaoLayout.createSequentialGroup()
                .addComponent(radioAberto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelSituacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(radioFechado)
                    .addComponent(textHoraFechamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        panelSaldo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Saldo", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jLabel2.setText("Saldo Total:");

        labelRS.setText("R$");

        jLabel3.setText("Crédito Total:");

        labelRS1.setText("R$");

        jLabel4.setText("Débito Total:");

        labelRS2.setText("R$");

        textSaldoCreditoTotal.setHorizontalAlignment(textSaldoCreditoTotal.RIGHT);
        textSaldoCreditoTotal.setDocument(new NumeroDocument(10,2));
        textSaldoCreditoTotal.setEnabled(false);

        textSaldoDebitoTotal.setHorizontalAlignment(textSaldoDebitoTotal.RIGHT);
        textSaldoDebitoTotal.setDocument(new NumeroDocument(10,2));
        textSaldoDebitoTotal.setEnabled(false);

        textSaldoTotal.setHorizontalAlignment(textSaldoTotal.RIGHT);
        textSaldoTotal.setDocument(new NumeroDocument(10,2));
        textSaldoTotal.setEnabled(false);

        javax.swing.GroupLayout panelSaldoLayout = new javax.swing.GroupLayout(panelSaldo);
        panelSaldo.setLayout(panelSaldoLayout);
        panelSaldoLayout.setHorizontalGroup(
            panelSaldoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(panelSaldoLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelRS1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textSaldoCreditoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(labelRS2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textSaldoDebitoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(panelSaldoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(labelRS)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(textSaldoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        panelSaldoLayout.setVerticalGroup(
            panelSaldoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSaldoLayout.createSequentialGroup()
                .addGroup(panelSaldoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(labelRS1)
                    .addComponent(jLabel4)
                    .addComponent(labelRS2)
                    .addComponent(textSaldoCreditoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textSaldoDebitoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelSaldoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(labelRS)
                    .addComponent(textSaldoTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        labelCodigo.setText("Codigo:");

        textCodigo.setEnabled(false);

        javax.swing.GroupLayout panelInformaçãoLayout = new javax.swing.GroupLayout(panelInformação);
        panelInformação.setLayout(panelInformaçãoLayout);
        panelInformaçãoLayout.setHorizontalGroup(
            panelInformaçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scrollTabela)
            .addGroup(panelInformaçãoLayout.createSequentialGroup()
                .addComponent(labelCodigo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInformaçãoLayout.createSequentialGroup()
                .addComponent(panelOpcoesConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelSaldo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        panelInformaçãoLayout.setVerticalGroup(
            panelInformaçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInformaçãoLayout.createSequentialGroup()
                .addGroup(panelInformaçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCodigo)
                    .addComponent(textCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scrollTabela, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelInformaçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelOpcoesConta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelSituacao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelSaldo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        panelOpcoes.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Opções", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        buttonSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Cancelar.png"))); // NOI18N
        buttonSair.setText("Sair");
        buttonSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSairActionPerformed(evt);
            }
        });

        buttonImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Imprimir (2).png"))); // NOI18N
        buttonImprimir.setText("Imprimir");
        buttonImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonImprimirActionPerformed(evt);
            }
        });

        buttonFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Concluir.png"))); // NOI18N
        buttonFechar.setText("Fechar o Caixa");
        buttonFechar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonFecharActionPerformed(evt);
            }
        });

        buttonLimpar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Novo.png"))); // NOI18N
        buttonLimpar.setText("Limpar");
        buttonLimpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonLimparActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelOpcoesLayout = new javax.swing.GroupLayout(panelOpcoes);
        panelOpcoes.setLayout(panelOpcoesLayout);
        panelOpcoesLayout.setHorizontalGroup(
            panelOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpcoesLayout.createSequentialGroup()
                .addComponent(buttonLimpar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonFechar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonImprimir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonSair)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelOpcoesLayout.setVerticalGroup(
            panelOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpcoesLayout.createSequentialGroup()
                .addGroup(panelOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonImprimir)
                    .addComponent(buttonSair)
                    .addComponent(buttonFechar)
                    .addComponent(buttonLimpar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelMensagem.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        textMensagem.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
        textMensagem.setBorder(null);

        javax.swing.GroupLayout panelMensagemLayout = new javax.swing.GroupLayout(panelMensagem);
        panelMensagem.setLayout(panelMensagemLayout);
        panelMensagemLayout.setHorizontalGroup(
            panelMensagemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(textMensagem)
        );
        panelMensagemLayout.setVerticalGroup(
            panelMensagemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMensagemLayout.createSequentialGroup()
                .addComponent(textMensagem)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelMensagem, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelOpcoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelInformação, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelInformação, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelOpcoes, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelMensagem, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonApagarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonApagarActionPerformed
        controle.adicionarContaPagar();
    }//GEN-LAST:event_buttonApagarActionPerformed

    @Override
    public void buttonLimparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLimparActionPerformed
        controle.limparGUI();
    }//GEN-LAST:event_buttonLimparActionPerformed

    private void buttonFecharActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonFecharActionPerformed
        controle.fechar();
    }//GEN-LAST:event_buttonFecharActionPerformed

    private void buttonConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConsultaActionPerformed
        controle.consulta();
    }//GEN-LAST:event_buttonConsultaActionPerformed

    private void textDataConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textDataConsultaActionPerformed
        controle.consulta();
    }//GEN-LAST:event_textDataConsultaActionPerformed

    private void buttonAreceberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAreceberActionPerformed
        controle.adicionarContaReceber();
    }//GEN-LAST:event_buttonAreceberActionPerformed

    private void buttonDesfazerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDesfazerActionPerformed
        controle.desfazerPagamento();
    }//GEN-LAST:event_buttonDesfazerActionPerformed

    private void buttonImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImprimirActionPerformed
        controle.imprimir();
    }//GEN-LAST:event_buttonImprimirActionPerformed

    private void buttonSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_buttonSairActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton buttonApagar;
    public javax.swing.JButton buttonAreceber;
    public javax.swing.JButton buttonConsulta;
    public javax.swing.JButton buttonDesfazer;
    public javax.swing.JButton buttonFechar;
    public javax.swing.JButton buttonImprimir;
    private javax.swing.JButton buttonLimpar;
    public javax.swing.JButton buttonSair;
    private javax.swing.ButtonGroup groupSituacao;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel labelCodigo;
    private javax.swing.JLabel labelRS;
    private javax.swing.JLabel labelRS1;
    private javax.swing.JLabel labelRS2;
    private javax.swing.JPanel panelConsulta;
    private javax.swing.JPanel panelInformação;
    private javax.swing.JPanel panelMensagem;
    private javax.swing.JPanel panelOpcoes;
    private javax.swing.JPanel panelOpcoesConta;
    private javax.swing.JPanel panelSaldo;
    private javax.swing.JPanel panelSituacao;
    public javax.swing.JRadioButton radioAberto;
    public javax.swing.JRadioButton radioFechado;
    private javax.swing.JScrollPane scrollTabela;
    public javax.swing.JTable tabela;
    public javax.swing.JTextField textCodigo;
    public javax.swing.JTextField textDataConsulta;
    public javax.swing.JTextField textHoraFechamento;
    public javax.swing.JTextField textMensagem;
    public javax.swing.JTextField textSaldoCreditoTotal;
    public javax.swing.JTextField textSaldoDebitoTotal;
    public javax.swing.JTextField textSaldoTotal;
    // End of variables declaration//GEN-END:variables
}
